package model.admin;
import vo.*;
import myutil.Connect;
import java.sql.*;
import java.util.ArrayList;
public class PopulateStudentsListMo {
	ArrayList<StudentDetailsVo> list=new ArrayList<StudentDetailsVo>(); 
	public ArrayList<StudentDetailsVo> populatelist() throws Exception{
		String query="select * from student_details";
		Connect c=new Connect();
		ResultSet rs=c.getResult(query);
		while(rs.next()){
			StudentDetailsVo single_object=new StudentDetailsVo();
			single_object.setEmail_id(rs.getString("email_id"));
			single_object.setStudent_id(rs.getInt("student_id"));
			single_object.setRoll_number(rs.getString("roll_number"));
			single_object.setStudent_name(rs.getString("student_name"));
			single_object.setMobile_number(rs.getString("mobile_number"));
			single_object.setAddress_line_1(rs.getString("address_line_1"));
			list.add(single_object);
			
		}
		return list;
		
	}

}
